package com.bootdo.clouddoES.controller;

/**
 * @title: DirectReceiver1
 * @Author gjt
 * @Date: 2020-12-12
 * @Description：
 */
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class DirectReceiver1 {

    @RabbitHandler
    @RabbitListener(queues = "TestDirectQueue")//监听的队列名称 TestDirectQueue
    public void process(String testMsg){
        System.out.println("DirectReceiver消费者收到消息1  : " + testMsg.toString());
    }
    @RabbitHandler
    @RabbitListener(queues = "TestDirectQueue")//监听的队列名称 TestDirectQueue
    public void process1(String testMsg){
        System.out.println("DirectReceiver消费者收到消息2  : " + testMsg.toString());
    }
    @RabbitHandler
    @RabbitListener(queues = "TestDirectQueue")//监听的队列名称 TestDirectQueue
    public void process2(String testMsg){
        System.out.println("DirectReceiver消费者收到消息3  : " + testMsg.toString());
    }

}